﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Reflection;

namespace DLLToolsLibrary
{
    public partial class AssemblyInfoDlg : Form
    {
        public AssemblyName[] assemblyNames;
        public AssemblyInfoDlg(AssemblyName[] referencedAssemblies)
        {
            InitializeComponent();
            assemblyNames = referencedAssemblies;
            //assemblyNames[0].
            BindingSource bSource = new BindingSource();
            bSource.DataSource = from AssemblyName a in referencedAssemblies
                                 select new
                                 {
                                     Name = a.Name,
                                     Version = a.Version,
                                     Culture = a.CultureInfo.EnglishName,
                                     FullName = a.FullName
                                 };
             
            dataGridViewAssemblies.DataSource = bSource;
        }

        public AssemblyName[] AssemblyNames
        {
            get
            {
                return assemblyNames;
            }
        }
    }


    //public class AssemblyDetails
    //{
    //    private String name;
    //    private String version;
    //    private String cultureInfo;

    //    public AssemblyDetails(String assemblyName, String assemblyVersion, String assemblyCultureInfo)
    //    {
    //        name = assemblyName;
    //        version = assemblyVersion;
    //        cultureInfo = assemblyCultureInfo;
    //    }

    //    public String Name
    //    {
    //        get
    //        {
    //            return name;
    //        }
    //    }

    //    public String Version
    //    {
    //        get
    //        {
    //            return version;
    //        }
    //    }

    //    public String Culture
    //    {
    //        get
    //        {
    //            return cultureInfo;
    //        }
    //    }
    //}
}
